/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package nominalitzacions.ui;

import java.awt.BorderLayout;
import java.awt.FlowLayout;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.ScrollPaneConstants;

/**
 *
 * @author marc.mauri
 */
public class CorpusEditor extends JFrame {

    public CorpusEditor(Object rowData[][]) {
        super();
        this.setTitle("Corpus Editor - Nominalizator");

        JPanel mainPanel = new JPanel();
        mainPanel.setLayout(new BorderLayout() );

        String[] columnNames = {"Alpha", "Beta"};

        JTable table = new JTable(rowData, columnNames);

        JScrollPane scrollTable = new JScrollPane(table);
        scrollTable.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
        mainPanel.add(scrollTable, BorderLayout.CENTER);

        JPanel southPanel = new JPanel();
        southPanel.setLayout(new FlowLayout() );

        JButton acceptButton = new JButton("Accept");
        southPanel.add(acceptButton);

        JButton cancelButton = new JButton("Cancel");
        southPanel.add(cancelButton);

        mainPanel.add(southPanel, BorderLayout.SOUTH);

        this.setContentPane(mainPanel);
        this.setSize(400, 300);
        this.setResizable(false);
        this.setDefaultCloseOperation(EXIT_ON_CLOSE);
        this.setVisible(true);

    }
}

